<template>
  <main class="wss-container">
    <ComTabs
      @EventSelectTab="currentSelect"
      :activeName="activeName"
      :tabList="tabList"
    ></ComTabs>
    <Default
      v-hasPermi="['work:crawlerFail:list']"
      v-if="activeName == 'default'"
    ></Default>
    <MyObject v-else></MyObject>
  </main>
</template>

<script>
import ComTabs from "@/wss/components/ComTabs.vue";
import Default from "@/wss/newViews/delivery/reptile/default.vue";
import MyObject from "@/wss/newViews/delivery/reptile/object.vue";

export default {
  components: { ComTabs, Default, MyObject },
  data() {
    return {
      activeName: "object",
      // tab页数据
      tabList: [
        {
          label: "爬虫对象",
          name: "object",
        },
        {
          label: "爬虫失败",
          name: "default",
        },
        // {
        //   label: "项目标准",
        //   name: "standard",
        // },
      ],
    };
  },
  methods: {
    currentSelect({ label, index, name }) {
      this.activeName = name;
    },
  },
};
</script>

<style scoped>
.wss-container {
  display: flex;
  flex-direction: column;
  overflow: initial;
}
.wss-container .el-tabs {
  height: 40px;
  margin-bottom: 20px;
}
</style>